import React, { memo } from "react";
import { View, OpenData } from "@tarojs/components";
import { Image } from '@antmjs/vantui'
import Taro from '@tarojs/taro';


import './index.scss'

const MineHeader = () => {
  const navPosition = Taro.getStorageSync('nav-position') ? JSON.parse(Taro.getStorageSync('nav-position')) : {}
  const userInfo = Taro.getStorageSync('user-info') ? JSON.parse(Taro.getStorageSync('user-info')) : {}

  return (
    <View className='mine-header'>
      <View className='mine_header_bgc padding_one' />
      <View className='user-msg' style={{ paddingTop: `${navPosition.top + navPosition.height + 17}px` }}>
        <Image width='87px' height='19px' src={require('@/assets/images/hello.png')}></Image>

        <View className='user-name black'> <OpenData type='userNickName' /></View>
      </View>
    </View>
  );
};

export default memo(MineHeader);
